﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace vsXPathTester.Lib
{
    /// <summary>
    /// Deletgate for Tab Closing
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void CloseTab(ITabbedWindow sender, EventArgs e);

    /// <summary>
    /// Delegate to reload Tab Data.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void ReloadTabData(ITabbedWindow sender, EventArgs e);

    /// <summary>
    /// Interface for Tabbed Windows Style MDI.
    /// </summary>
    public interface ITabbedWindow
    {
        /// <summary>
        /// Event for Closing Tab handle
        /// </summary>
        event CloseTab CloseInitiated;

        /// <summary>
        /// Event to reload Tab Data
        /// </summary>
        event ReloadTabData Reload;

        /// <summary>
        /// Name of the Tab Window
        /// </summary>
        string TabName { get; set; }

        /// <summary>
        /// Title of the Tab Window
        /// </summary>
        string TabTitle { get; set; }

        /// <summary>
        /// If Tab is loaded fully.
        /// </summary>
        bool IsAllowRefresh { get; set; }


        void ReloadData();
    }
}
